<script>
	// import jweixin from 'weixin-js-sdk';
	export default {
		onLaunch: function() {

			console.log('App Launch')
			// #ifdef H5	
			if (typeof WeixinJSBridge == "undefined") {
				if (document.addEventListener) {
					document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady, false);
				} else if (document.attachEvent) {
					document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady);
					document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady);
				}
			} else {
				this.onBridgeReady();
			}
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods: {
			onBridgeReady() {
				WeixinJSBridge.call('hideOptionMenu');
			}

		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";

	html,
	body {
		background: #F8F8F8;
	}


	// #ifdef H5
	.uni-page-head {
		height: 0 !important;
		padding: 0 !important;
	}

	.uni-page-head~.uni-placeholder {
		height: 0 !important;
	}

	uni-page-wrapper {
		height: calc(100% - env(safe-area-inset-top) - 50px - env(safe-area-inset-bottom)) !important;
		// height: 100% !important;
		background: #F8F8F8;
	}

	uni-page-body {
		height: 100% !important;
	}

	// #endif
</style>